package com.service;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.domain.Bestelling;
import com.interfaces.IBestellingDAO;

@Repository("bestellingDAO")
public class BestellingDAO extends HibernateDAO<Bestelling, Integer> implements IBestellingDAO{

	@Override
	public int getHoogsteBestelNr() {
		 Query query = currentSession().createQuery(
	                "select MAX(b.id) from bestelling b");
		return (Integer)query.uniqueResult();
	}

}
